<template>
  <div class="renewPayConfirmContainer">
    <div
      class="dialog animated"
      :class="open ? 'fadeIn' : 'fadeOut'"
      v-show="show"
      :style="{ visibility: visible ? 'visible' : 'hidden' }"
    >
      <div class="panel animated" :class="open ? 'zoomIn' : ''">
        <div class="title">
          续费
          <div class="close" @click="cancel()"></div>
        </div>
        <div class="confirm_box">
          <el-row :gutter="10" class="confirm_info">
            <el-col :span="6">学员姓名：赵乐乐</el-col>
            <el-col :span="6">监护人：罗琴</el-col>
            <el-col :span="8">联系电话：18000000000</el-col>
          </el-row>
          <div class="confirm_chargInfo">
            <div>计费信息</div>
            <el-row :gutter="10" class="confirm_chargInfo_row">
              <el-col :span="11">
                <div class="key">
                  <span class="redStar">*</span>计费开始日期
                </div>
                <div class="value">2019-09-01</div>
              </el-col>
              <el-col :span="12">
                <div class="key">
                  <span class="redStar">*</span>计费结束日期
                </div>
                <div class="value">2019-09-30</div>
              </el-col>
            </el-row>
          </div>
          <div class="confirm_payInfo">
            <div>缴费信息</div>
            <div class="confirm_payInfo_table">
              <div class="table" style="float:left;">
                <div class="thead">
                  <div style="width: 1rem;">学生</div>
                  <div style="width: 2rem;">班级</div>
                </div>
                <div class="tr_div">
                  <div class="tr">
                    <div style="width: 1rem;">赵可可</div>
                    <div style="width: 2rem;">幼儿 小(一)班</div>
                  </div>
                </div>
              </div>
              <div class="table" style="float:left;">
                <div class="thead">
                  <div style="width: 1.5rem;">应收科目</div>
                  <div style="width: 1.5rem;">单价(元/月)</div>
                  <div style="width: 1.35rem;">购买月数</div>
                  <div style="width: 1.2rem;">实际应收</div>
                  <div style="width: 1.2rem;">折扣</div>
                  <div style="width: 1.2rem;">折后应收</div>
                </div>
                <div class="tr_div">
                  <div class="tr">
                    <div style="width: 1.5rem;">学费</div>
                    <div style="width: 1.5rem;">￥2000.00</div>
                    <div style="width: 1.35rem;">10</div>
                    <div style="width: 1.2rem;">￥2000.00</div>
                    <div style="width: 1.2rem;">￥200.00</div>
                    <div style="width: 1.2rem;">￥1800.00</div>
                  </div>
                  <div class="tr">
                    <div style="width: 1.5rem;">餐费</div>
                    <div style="width: 1.5rem;">￥220.00</div>
                    <div style="width: 1.35rem;">10</div>
                    <div style="width: 1.2rem;">￥2000.00</div>
                    <div style="width: 1.2rem;">￥200.00</div>
                    <div style="width: 1.2rem;">￥1800.00</div>
                  </div>
                </div>
              </div>
            </div>
            <div class="pay_type">
              <div class="count">
                <div>总计应收：￥2300.00</div>
                <br />
                <div class="earnest">
                  <span class="earnest_check earnest_check_active"></span>
                  <span style="color:#333333;">抵扣订金：-￥100.00</span>
                </div>
                <br />
                <div class="real_money clue-enroll-confirm-realMoney">
                  实际应收：
                  <span>￥2220.00</span>
                </div>
              </div>
              <div class="title_sub">
                支付方式
              </div>
              <div>
                <div class="radio_group">
                  <label class="radio" v-for="(item, index) in payType">
                    <!-- :class="item.value == payMode ? 'radio_active' : ''" -->
                    <span class="radio_circle"></span>
                    <span class="radio_name">{{ item.name }}</span>
                  </label>
                </div>
              </div>
              <div style="margin-top:0.1rem;">
                <label class="label_2">备注</label>
                <el-input
                  v-model="remark"
                  id="remark"
                  style="width:10rem ;"
                  type="textarea"
                  :rows="2"
                  maxlength="100"
                  clearable
                ></el-input>
              </div>
            </div>
          </div>
        </div>
        <div class="btn_div">
          <div class="btn_sure" @click="previousStep()">上一步</div>
          <div class="btn_sure" @click="nextStep()">确定收费</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
var vm, user;
export default {
  data: function() {
    return {
      show: false,
      open: false,
      visible: false,
      remark: "",
      payType: []
    };
  },
  methods: {
    init: function(data) {
      vm.show = true;
      setTimeout(function() {
        vm.open = true;
        vm.visible = true;
      }, 11);
    },
    /**上一步 */
    previousStep() {
      vm.$emit("previousStep", "");
    },
    /**下一步 */
    nextStep() {
      vm.$emit("cancel", "");
    },
    cancel: function() {
      //隐藏弹窗
      vm.open = false;
      vm.$emit("cancel", "");
      setTimeout(function() {
        vm.show = false;
        vm.visible = false;
      }, 500);
    }
  },
  created: function() {
    vm = this;
    user = tool.getItem(lsKey.user, true); //得到当前用户信息
    let dict = tool.getItem(lsKey.dict, true);
    vm.payType = dict["pay_mode"];
  }
};
</script>
<style lang="scss">
.renewPayConfirmContainer {
  .step {
    overflow: hidden;
    padding-left: 0.2rem;
    .step_text {
      float: left;
      position: relative;
      text-align: center;
      font-size: 0.14rem;
      padding-top: 0.3rem;
      width: 0.9rem;
      height: 0.9rem;
      border-radius: 0.45rem;
      border: 0.01rem solid #409eff;
      line-height: 0.22rem;
      background: #f9f9f9;
    }
    .step_OK {
      position: absolute;
      right: 0.02rem;
      bottom: 0.16rem;
      width: 0.2rem;
    }
    .step_line {
      float: left;
      width: 0.4rem;
      height: 0.01rem;
      background: #409eff;
      margin: 0.44rem 0.06rem 0 0.06rem;
    }
    .step_detail {
      color: #409eff;
      font-size: 0.14rem;
      text-decoration: underline;
      cursor: pointer;
      margin: 0.2rem 0 0.3rem 0;
      padding-left: 6.2rem;
    }
  }
  .confirm_box {
    color: #666666;
    font-size: 0.16rem;
    margin-top: 0.2rem;
    padding: 0 0.2rem;
    overflow: hidden;
    .confirm_info {
      margin-bottom: 0.2rem;
      width: 70%;
    }
    .confirm_chargInfo {
      overflow: hidden;
      .confirm_chargInfo_row {
        margin-top: 0.1rem;
        margin-bottom: 0.1rem;
        width: 70%;
      }
      .key {
        .redStar {
          color: red;
        }
        float: left;
        margin-right: 0.1rem;
        width: 1.14rem;
        padding-top: 0.06rem;
        text-align: right;
      }
      .value {
        padding-top: 0.06rem;
        width: 2rem;
        float: left;
      }
    }
    .confirm_payInfo {
      margin-top: 0.1rem;
      .confirm_payInfo_table {
        margin-top: 0.1rem;
        overflow: hidden;
        .table {
          border-radius: 0.05rem;
          font-size: 0.16rem;
          letter-spacing: 0;
        }
        .thead {
          height: 0.5rem;
          line-height: 0.49rem;
          font-weight: bold;
          color: #939399;
          background: #e4e5e7;
        }
        .thead > div,
        .tr > div {
          float: left;
          height: 0.49rem;
          text-align: center;
          overflow: hidden;
          white-space: nowrap;
        }
        .tbody {
          min-height: 0.5rem;
          max-height: 2.99rem;
          overflow-y: auto;
          overflow-x: hidden;
        }
        .tbody::-webkit-scrollbar {
          width: 0.03rem;
          height: 0;
        }
        .tbody::-webkit-scrollbar-thumb {
          border-radius: 0.03rem;
          background: #3885f8;
        }
        .tr {
          height: 0.5rem;
          line-height: 0.49rem;
          color: #333333;
        }
        .tr_add {
          text-decoration: underline;
          color: #409eff;
          cursor: pointer;
        }
        .table .tr_div:last-child .tr {
          /*border-bottom: 0.01rem solid white;*/
          border-bottom: none;
        }
        .btn_add,
        .btn_reduce {
          display: inline-block;
          width: 0.25rem;
          height: 0.25rem;
          line-height: 0.25rem;
          margin-top: 0.11rem;
          /*float: left;*/
          /*outline: 1px solid red;*/
          font-size: 0.2rem;
          color: #3885f8;
          cursor: pointer;
          user-select: none;
        }
        .btn_reduce {
          /*margin-left: 0.3rem;*/
        }
        .buy_num {
          display: inline-block;
          min-width: 0.4rem;
          /*float: left;*/
          /*outline: 1px solid red;*/
          color: #3885f8;
        }
        .btn_del {
          /*outline: 1px solid red;*/
          width: 0.6rem;
          height: 0.25rem;
          line-height: 0.25rem;
          margin: 0.12rem auto 0 auto;
          text-align: left;
          padding-left: 0.22rem;
          color: #3885f8;
          background-image: url(~@/assets/img/clue_manage/enroll_del.png);
          background-size: 0.18rem;
          background-repeat: no-repeat;
          background-position: left center;
          cursor: pointer;
        }
        .compute {
          position: relative;
          line-height: 0.48rem;
          height: 0.48rem;
          text-align: center;
          color: #333333;
          font-size: 0.16rem;
        }
        .compute_money {
          position: absolute;
          width: 2rem;
          height: 0.48rem;
          right: 0.3rem;
          top: 0;
          text-align: right;
          font-weight: bold;
          color: #3885f8;
          /*outline: 1px solid blue;*/
        }
      }
      .pay_type {
        overflow: hidden;
        .count {
          padding: 0.1rem 0.1rem 0.1rem 0;
          /*margin-bottom: 0.05rem;*/
          text-align: right;
          line-height: 0.3rem;
          color: #333333;
          font-size: 0.18rem;
          border-bottom: 0.01rem solid #f3f6fc;
          overflow: hidden;
        }

        .count > div {
          float: right;
        }

        .reduce {
          font-size: 0.16rem;
          cursor: pointer;
        }

        .earnest {
          font-size: 0.16rem;
          cursor: pointer;
          /*margin-bottom: 0.08rem;*/
        }

        .earnest_check {
          display: inline-block;
          vertical-align: middle;
          width: 0.25rem;
          height: 0.25rem;
          background-size: 0.16rem;
          background-repeat: no-repeat;
          background-position: center;
          background-image: url(~@/assets/img/clue_manage/check_no.png);
          position: relative;
          bottom: 0.01rem;
        }

        .earnest_check_active {
          background-image: url(~@/assets/img/clue_manage/check_yes.png);
        }

        .real_money {
          padding-top: 0.08rem;
        }

        .real_money > span {
          font-size: 0.26rem;
          color: #fc7301;
        }

        .title_sub {
          font-size: 0.22rem;
          color: #333333;
          line-height: 0.6rem;
        }

        .title_sub span {
          display: inline-block;
          color: red;
          width: 0.2rem;
          position: relative;
          top: 0.02rem;
        }

        .row {
          margin-bottom: 0.1rem;
        }

        .label_2 {
          display: inline-block;
          width: 0.5rem;
          font-size: 0.16rem;
          color: #666666;
          height: 0.6rem;
        }
        .radio_group {
          color: #333333;
          font-size: 0.18rem;
          padding-left: 0.2rem;
          padding-bottom: 0.05rem;
        }

        .radio_circle {
          top: 0.01rem;
        }
      }
    }
  }
}
</style>
<style scoped src="@/style/module/radio.css"></style>
<style scoped src="@/style/module/dialog.css"></style>
<style scoped>
</style>





